perm filename MF.LST[MF,DEK] blob sn#776998 filedate 1984-11-25 generic text, type T, neo UTF8
  1) MF.WEB[MF,DEK] and 2) MF.WEB[MF,SYS]	11-25-84 18:31	pages 3,3

**** File 1) MF.WEB[MF,DEK]/3P/73L
1)	@d banner=='This is METAFONT, Version 0.6' {printed when \MF\ starts}
1)	@ Different \PASCAL s have slightly different conventions, and the present
**** File 2) MF.WEB[MF,SYS]/3P/73L
2)	@d banner=='This is METAFONT, Version 0.5' {printed when \MF\ starts}
2)	@ Different \PASCAL s have slightly different conventions, and the present
***************


**** File 1) MF.WEB[MF,DEK]/10P/345L
1)	begin print_err("angle(0,0) is taken as zero");
1)	@.angle(0,0)...zero@>
1)	help2("The `angle' between two identical points is undefined.")@/
**** File 2) MF.WEB[MF,SYS]/10P/345L
2)	begin print_err("argd(0,0) is taken as zero");
2)	@.argd(0,0)...zero@>
2)	help2("The `angle' between two identical points is undefined.")@/
***************


**** File 1) MF.WEB[MF,DEK]/14P/220L
1)	@d angle_op=65 {operation code for \&{angle}}
1)	@d cycle_op=66 {operation code for \&{cycle}}
**** File 2) MF.WEB[MF,SYS]/14P/220L
2)	@d arg_d_op=65 {operation code for \&{argd}}
2)	@d cycle_op=66 {operation code for \&{cycle}}
***************


**** File 1) MF.WEB[MF,DEK]/14P/294L
1)	angle_op:print("angle");
1)	cycle_op:print("cycle");
**** File 2) MF.WEB[MF,SYS]/14P/294L
2)	arg_d_op:print("argd");
2)	cycle_op:print("cycle");
***************


**** File 1) MF.WEB[MF,DEK]/16P/19L
1)	or by |token_base+k| if it is of type \&{tokens}.
1)	(Here |-param_size≤k<param_size| in the case of \&{expr} parameters,
**** File 2) MF.WEB[MF,SYS]/16P/19L
2)	or by |text_base+k| if it is of type \&{text}.
2)	(Here |-param_size≤k<param_size| in the case of \&{expr} parameters,
***************


**** File 1) MF.WEB[MF,DEK]/16P/23L
1)	see later.  The constants |expr_base|, |suffix_base|, and |token_base| are,
1)	of course, chosen so that there will be no confusion between symbolic
**** File 2) MF.WEB[MF,SYS]/16P/23L
2)	see later.  The constants |expr_base|, |suffix_base|, and |text_base| are,
2)	of course, chosen so that there will be no confusion between symbolic
***************


**** File 1) MF.WEB[MF,DEK]/16P/33L
1)	@d token_base==suffix_base+param_size {code for the zeroth \&{tokens} parameter}
1)	@<Check the ``constant''...@>=
1)	if token_base+param_size>max_halfword then bad←22;
1)	@ A numeric token is created by the following trivial routine.
**** File 2) MF.WEB[MF,SYS]/16P/33L
2)	@d text_base==suffix_base+param_size {code for the zeroth \&{text} parameter}
2)	@<Check the ``constant''...@>=
2)	if text_base+param_size>max_halfword then bad←22;
2)	@ A numeric token is created by the following trivial routine.
***************


**** File 1) MF.WEB[MF,DEK]/16P/107L
1)			if r=0 then @<Display a collective subscript@>
1)			else print(" IMPOSSIBLE")
**** File 2) MF.WEB[MF,SYS]/16P/107L
2)			if r=0 then @<Display a generic subscript@>
2)			else print(" IMPOSSIBLE")
***************


**** File 1) MF.WEB[MF,DEK]/16P/143L
1)	@<Display a collective subscript@>=
1)	begin if class=left_bracket_class then print_char(" ");
**** File 2) MF.WEB[MF,SYS]/16P/143L
2)	@<Display a generic subscript@>=
2)	begin if class=left_bracket_class then print_char(" ");
***************


**** File 1) MF.WEB[MF,DEK]/16P/153L
1)	else if r<token_base then
1)		begin print("(SUFFIX"); r←r-(suffix_base);
**** File 2) MF.WEB[MF,SYS]/16P/153L
2)	else if r<text_base then
2)		begin print("(SUFFIX"); r←r-(suffix_base);
***************


**** File 1) MF.WEB[MF,DEK]/16P/157L
1)	else	begin print("(TOKENS"); r←r-(token_base);
1)	@.TOKENS@>
1)		end;
**** File 2) MF.WEB[MF,SYS]/16P/157L
2)	else	begin print("(TEXT"); r←r-(text_base);
2)	@.TEXT@>
2)		end;
***************


**** File 1) MF.WEB[MF,DEK]/17P/57L
1)	node whose |attr_loc| field is zero; the latter node represents a collective
1)	subscript `\.{[]}' attached to the parent, and its |link| field points to
**** File 2) MF.WEB[MF,SYS]/17P/57L
2)	node whose |attr_loc| field is zero; the latter node represents a generic
2)	subscript `\.{[]}' attached to the parent, and its |link| field points to
***************


**** File 1) MF.WEB[MF,DEK]/17P/66L
1)	for collective subscripts at this level. We have seen that the latter node
1)	contains an upward pointer, so that the parent can be deduced.
**** File 2) MF.WEB[MF,SYS]/17P/66L
2)	for generic subscripts at this level. We have seen that the latter node
2)	contains an upward pointer, so that the parent can be deduced.
***************


**** File 1) MF.WEB[MF,DEK]/17P/89L
1)	|attr_loc(q1)=collective_subscript=0|, |parent(q1)=p|,
1)	|type(q1)=structured|, |attr_head(q1)=qq|, and |subscr_head(q1)=qq1|;
**** File 2) MF.WEB[MF,SYS]/17P/89L
2)	|attr_loc(q1)=generic_subscript=0|, |parent(q1)=p|,
2)	|type(q1)=structured|, |attr_head(q1)=qq|, and |subscr_head(q1)=qq1|;
***************


**** File 1) MF.WEB[MF,DEK]/17P/97L
1)	undefined. We have |name_type(qq1)=attr|, |attr_loc(qq1)=collective_subscript|,
1)	|parent(qq1)=q1|, and |link(qq1)=qq2|. Since |qq2| represents
**** File 2) MF.WEB[MF,SYS]/17P/97L
2)	undefined. We have |name_type(qq1)=attr|, |attr_loc(qq1)=generic_subscript|,
2)	|parent(qq1)=q1|, and |link(qq1)=qq2|. Since |qq2| represents
***************


**** File 1) MF.WEB[MF,DEK]/17P/118L
1)	collective subscript attributes. The idea is to avoid repeating a lot of
1)	type information when many elements of an array are identical macros
1)	(for which distinct values need not be stored) or when they don't have
1)	all of the possible attributes. Branches of the structure below collective
1)	subscript attributes do not carry actual values except for macro identifiers;
1)	branches of the structure below subscript nodes do not carry significant
1)	information in their collective subscript attributes.
1)	@d attr_loc_loc(#)==#+2 {where the |attr_loc| and |parent| fields are}
**** File 2) MF.WEB[MF,SYS]/17P/118L
2)	generic subscript attributes. The idea is to avoid repeating a lot of
2)	type information when many elements of an array are identical macros
2)	(for which distinct values need not be stored) or when they don't have
2)	all of the possible attributes. Branches of the structure below generic
2)	subscript attributes do not carry actual values except for macro identifiers;
2)	branches of the structure below subscript nodes do not carry significant
2)	information in their generic subscript attributes.
2)	@d attr_loc_loc(#)==#+2 {where the |attr_loc| and |parent| fields are}
***************


**** File 1) MF.WEB[MF,DEK]/17P/133L
1)	@d collective_subscript=0 {code for the attribute `\.{[]}'}
1)	@<Initialize table...@>=
**** File 2) MF.WEB[MF,SYS]/17P/133L
2)	@d generic_subscript=0 {code for the attribute `\.{[]}'}
2)	@<Initialize table...@>=
***************


**** File 1) MF.WEB[MF,DEK]/17P/319L
1)	attr_loc(q)←collective_subscript; new_structure←r;
1)	end;
**** File 2) MF.WEB[MF,SYS]/17P/319L
2)	attr_loc(q)←generic_subscript; new_structure←r;
2)	end;
***************


**** File 1) MF.WEB[MF,DEK]/17P/333L
1)	@ If the attribute is |collective_subscript|, there are two pointers to
1)	node~|p|, so we must change both of them.
1)	@<Link a new attribute node |r| in place of node |p|@>=
**** File 2) MF.WEB[MF,SYS]/17P/333L
2)	@ If the attribute is |generic_subscript|, there are two pointers to node~|p|,
2)	so we must change both of them.
2)	@<Link a new attribute node |r| in place of node |p|@>=
***************


**** File 1) MF.WEB[MF,DEK]/17P/342L
1)	if attr_loc(p)=collective_subscript then
1)		begin q←subscr_head_loc(parent(p));
**** File 2) MF.WEB[MF,SYS]/17P/342L
2)	if attr_loc(p)=generic_subscript then
2)		begin q←subscr_head_loc(parent(p));
***************


**** File 1) MF.WEB[MF,DEK]/17P/356L
1)	arise with respect to updating the collective subscript information.
1)	If a macro type is detected anywhere along path~|t|, or if the first
**** File 2) MF.WEB[MF,SYS]/17P/356L
2)	arise with respect to updating the generic subscript information.
2)	If a macro type is detected anywhere along path~|t|, or if the first
***************


**** File 1) MF.WEB[MF,DEK]/17P/368L
1)	@!pp,@!qq,@!rr,@!ss:pointer; {nodes in the ``collective'' line}
1)	@!n:integer; {subscript or attribute}
**** File 2) MF.WEB[MF,SYS]/17P/368L
2)	@!pp,@!qq,@!rr,@!ss:pointer; {nodes in the ``generic'' line}
2)	@!n:integer; {subscript or attribute}
***************


**** File 1) MF.WEB[MF,DEK]/17P/395L
1)	|pp|~stays in the collective line while |p|~goes through actual subscript
1)	values.
1)	@<Make sure that both nodes |p| and |pp|...@>=
**** File 2) MF.WEB[MF,SYS]/17P/395L
2)	|pp|~stays in the generic line while |p|~goes through actual subscript values.
2)	@<Make sure that both nodes |p| and |pp|...@>=
***************


**** File 1) MF.WEB[MF,DEK]/17P/415L
1)	pp←link(attr_head(pp)); {now |attr_loc(pp)=collective_subscript|}
1)	q←link(attr_head(p)); save_word←mem[subscript_loc(q)];
**** File 2) MF.WEB[MF,SYS]/17P/414L
2)	pp←link(attr_head(pp)); {now |attr_loc(pp)=generic_subscript|}
2)	q←link(attr_head(p)); save_word←mem[subscript_loc(q)];
***************


**** File 1) MF.WEB[MF,DEK]/17P/463L
1)	suffix, except for the collective node \.{x[]a[]} itself. The obvious way
1)	to handle such examples is to use recursion; so that's what we do.
1)	@↑recursion@>
**** File 2) MF.WEB[MF,SYS]/17P/462L
2)	suffix, except for the generic \.{x[]a[]} itself. The obvious way to handle
2)	such examples is to use recursion; so that's what we do.
2)	@↑recursion@>
***************


**** File 1) MF.WEB[MF,DEK]/17P/469L
1)	suffixes, with |info=collective_subscript| for subscripts.
1)	@p @t\4@>@<Declare subroutines for printing expressions@>@;@/
**** File 2) MF.WEB[MF,SYS]/17P/468L
2)	suffixes, with |info=generic_subscript| for subscripts.
2)	@p @t\4@>@<Declare subroutines for printing expressions@>@;@/
***************


**** File 1) MF.WEB[MF,DEK]/17P/483L
1)		if n=collective_subscript then
1)			begin r←subscr_head_loc(p); q←link(r); {|q=subscr_head(p)|}
**** File 2) MF.WEB[MF,SYS]/17P/482L
2)		if n=generic_subscript then
2)			begin r←subscr_head_loc(p); q←link(r); {|q=subscr_head(p)|}
***************


**** File 1) MF.WEB[MF,DEK]/20P/56L
1)			begin right_type(q)←curl; right_curl(q)←unity;
1)			end;
**** File 2) MF.WEB[MF,SYS]/20P/56L
2)			begin right_type(q)←curl; right_curl(p)←unity;
2)			end;
***************


**** File 1) MF.WEB[MF,DEK]/20P/125L
1)	@↑curvature@>
1)	$${2\sigma\k\sin(\theta_k+\phi\k)-6\sin\theta_k\over\rho_k↑2d_{k,k+1}}
**** File 2) MF.WEB[MF,SYS]/20P/125L
2)	$${2\sigma\k\sin(\theta_k+\phi\k)-6\sin\theta_k\over\rho_k↑2d_{k,k+1}}
***************


**** File 1) MF.WEB[MF,DEK]/20P/130L
1)	@↑mock curvature@>
1)	approximation to this true curvature that arises in the limit for
**** File 2) MF.WEB[MF,SYS]/20P/129L
2)	approximation to this true curvature that arises in the limit for
***************


**** File 1) MF.WEB[MF,DEK]/33P/133L
1)	\indent|parameter|, if a \&{tokens} or \&{suffix} parameter is being scanned;
1)	\indent|backed_up|, if the token list being scanned has been inserted as
**** File 2) MF.WEB[MF,SYS]/33P/133L
2)	\indent|parameter|, if a \&{text} or \&{suffix} parameter is being scanned;
2)	\indent|backed_up|, if the token list being scanned has been inserted as
***************


**** File 1) MF.WEB[MF,DEK]/34P/52L
1)			else flush_token_list(p); {it's a \&{suffix} or \&{tokens} parameter}
1)		end;
**** File 2) MF.WEB[MF,SYS]/34P/52L
2)			else flush_token_list(p); {it's a \&{suffix} or \&{text} parameter}
2)		end;
***************


**** File 1) MF.WEB[MF,DEK]/35P/31L
1)	@d absorbing=3 {|scanner_status| when a \&{tokens} parameter is being scanned}
1)	@d var_defining=4 {|scanner_status| when a \&{vardef} is being scanned}
**** File 2) MF.WEB[MF,SYS]/35P/31L
2)	@d absorbing=3 {|scanner_status| when a \&{text} parameter is being scanned}
2)	@d var_defining=4 {|scanner_status| when a \&{vardef} is being scanned}
***************


**** File 1) MF.WEB[MF,DEK]/35P/104L
1)	absorbing: begin print("tokens for a macro argument");
1)		help_line[3]←"It seems that a right delimiter was left out,";
**** File 2) MF.WEB[MF,SYS]/35P/104L
2)	absorbing: begin print("a text argument");
2)		help_line[3]←"It seems that a right delimiter was left out,";
***************


**** File 1) MF.WEB[MF,DEK]/35P/250L
1)	print_err("Incomplete string token has been flushed");
1)	@.Incomplete string token...@>
1)	help3("Strings should finish on the same line as they began.")@/
**** File 2) MF.WEB[MF,SYS]/35P/250L
2)	print_err("Incomplete string constant has been flushed");
2)	@.Incomplete string constant...@>
2)	help3("Strings should finish on the same line as they began.")@/
***************


**** File 1) MF.WEB[MF,DEK]/35P/275L
1)	f←round_decimals(k);
1)	if f=unity then
1)		begin incr(n); f←0;
1)		end
1)	@ @<Pack the numeric and fraction parts of a numeric token and |return|@>=
**** File 2) MF.WEB[MF,SYS]/35P/275L
2)	f←round_decimals(k)
2)	@ @<Pack the numeric and fraction parts of a numeric token and |return|@>=
***************


**** File 1) MF.WEB[MF,DEK]/36P/249L
1)	equiv(warning_info)←q; get_x_next;
1)	end;
**** File 2) MF.WEB[MF,SYS]/36P/249L
2)	equiv(warning_info)←q; get_next;
2)	end;
***************


**** File 1) MF.WEB[MF,DEK]/36P/306L
1)	scanner_status←normal; get_x_next;
1)	end;
**** File 2) MF.WEB[MF,SYS]/36P/306L
2)	scanner_status←normal; get_next;
2)	end;
***************


**** File 1) MF.WEB[MF,DEK]/39P/71L
1)		begin loop_type(s)←void; p←null; get_x_next; goto found;
1)		end;
1)	get_symbol; p←get_node(token_node_size); info(p)←cur_sym; value(p)←m;@/
1)	get_x_next;
1)	if (cur_cmd≠equals)∧(cur_cmd≠assignment) then
**** File 2) MF.WEB[MF,SYS]/39P/71L
2)		begin loop_type(s)←void; p←null; get_next; goto found;
2)		end;
2)	get_symbol; p←get_node(token_node_size); info(p)←cur_sym; value(p)←m;@/
2)	get_next;
2)	if (cur_cmd≠equals)∧(cur_cmd≠assignment) then
***************


**** File 1) MF.WEB[MF,DEK]/42P/262L
1)	``collective'' structure to see if we are actually dealing with a macro
1)	instead of a value.
**** File 2) MF.WEB[MF,SYS]/42P/262L
2)	``generic'' structure to see if we are actually dealing with a macro
2)	instead of a value.
***************


**** File 1) MF.WEB[MF,DEK]/42P/367L
1)			q←link(attr_head(q)); {the |collective_subscript| attribute}
1)			if p>hi_mem_base then {it's not a subscript}
**** File 2) MF.WEB[MF,SYS]/42P/367L
2)			q←link(attr_head(q)); {the |generic_subscript| attribute}
2)			if p>hi_mem_base then {it's not a subscript}
***************


**** File 1) MF.WEB[MF,DEK]/44P/90L
1)	primitive("angle",unary,angle_op);@/
1)	@!@:angle_}{\&{angle} primitive@>
1)	primitive("cycle",cycle,cycle_op);@/
**** File 2) MF.WEB[MF,SYS]/44P/90L
2)	primitive("argd",unary,arg_d_op);@/
2)	@!@:arg_d_}{\&{argd} primitive@>
2)	primitive("cycle",cycle,cycle_op);@/
***************


**** File 1) MF.WEB[MF,DEK]/44P/336L
1)	angle_op:if nice_pair(cur_exp,cur_type) then
1)			begin p←value(cur_exp);
**** File 2) MF.WEB[MF,SYS]/44P/336L
2)	arg_d_op:if nice_pair(cur_exp,cur_type) then
2)			begin p←value(cur_exp);
***************


**** File 1) MF.WEB[MF,DEK]/44P/340L
1)		else bad_unary(angle_op);
1)	@ If the current expression is a pair, but the context wants it to
**** File 2) MF.WEB[MF,SYS]/44P/340L
2)		else bad_unary(arg_d_op);
2)	@ If the current expression is a pair, but the context wants it to
***************


**** File 1) MF.WEB[MF,DEK]/44P/392L
1)		else if cur_type=numeric then cur_exp←abs(cur_exp)
1)		else if nice_pair(cur_exp,cur_type) then
1)			flush_cur_exp(pyth_add(value(x_part_loc(value(cur_exp))),@|
1)				value(y_part_loc(value(cur_exp)))))
1)		else bad_unary(c);
**** File 2) MF.WEB[MF,SYS]/44P/392L
2)		else if cur_type=pair_type then flush_cur_exp(0)
2)		else bad_unary(c);
***************


**** File 1) MF.WEB[MF,DEK]/45P/399L
1)	loop@+	begin get_x_next;
1)		if cur_sym=0 then goto done;
1)		if cur_cmd≠tag_token then if cur_cmd≠internal_quantity then
1)			if cur_cmd=left_bracket then @<Descend past a collective subscript@>
1)			else goto done;
**** File 2) MF.WEB[MF,SYS]/45P/399L
2)	loop@+	begin get_next;
2)		if cur_sym=0 then goto done;
2)		if cur_cmd≠tag_token then if cur_cmd≠internal_quantity then
2)			if cur_cmd=left_bracket then @<Descend past a generic subscript@>
2)			else goto done;
***************


**** File 1) MF.WEB[MF,DEK]/45P/409L
1)	@ If the subscript isn't collective, we don't accept it as part of the
1)	declared variable.
1)	@<Descend past a collective subscript@>=
1)	begin l←cur_sym; get_x_next;
1)	if cur_cmd≠right_bracket then
**** File 2) MF.WEB[MF,SYS]/45P/409L
2)	@ If the subscript isn't generic, we don't accept it as part of the
2)	declared variable.
2)	@<Descend past a generic subscript@>=
2)	begin l←cur_sym; get_next;
2)	if cur_cmd≠right_bracket then
***************


**** File 1) MF.WEB[MF,DEK]/45P/417L
1)	else cur_sym←collective_subscript;
1)	end
**** File 2) MF.WEB[MF,SYS]/45P/417L
2)	else cur_sym←generic_subscript;
2)	end
***************


**** File 1) MF.WEB[MF,DEK]/45P/465L
1)		("names and collective subscripts, e.g., `x[]a'.")@/
1)		("Are you trying to use a reserved word in a variable name?")@/
**** File 2) MF.WEB[MF,SYS]/45P/465L
2)		("names and generic subscripts, e.g., `x[]a'.")@/
2)		("Are you trying to use a reserved word in a variable name?")@/
***************


**** File 1) MF.WEB[MF,DEK]/46P/38L
1)		get_x_next;
1)		end;
**** File 2) MF.WEB[MF,SYS]/46P/38L
2)		get_next;
2)		end;
***************


**** File 1) MF.WEB[MF,DEK]/46P/83L
1)		get_x_next;
1)	until cur_cmd≠comma;
**** File 2) MF.WEB[MF,SYS]/46P/83L
2)		get_next;
2)	until cur_cmd≠comma;
***************


**** File 1) MF.WEB[MF,DEK]/46P/103L
1)	get_x_next;
1)	end;
**** File 2) MF.WEB[MF,SYS]/46P/103L
2)	get_next;
2)	end;
***************


**** File 1) MF.WEB[MF,DEK]/46P/133L
1)	save_command: repeat get_symbol; save_variable(cur_sym); get_x_next;
1)		until cur_cmd≠comma;
**** File 2) MF.WEB[MF,SYS]/46P/133L
2)	save_command: repeat get_symbol; save_variable(cur_sym); get_next;
2)		until cur_cmd≠comma;
***************


**** File 1) MF.WEB[MF,DEK]/46P/142L
1)	begin get_x_next;
1)	if cur_cmd≠internal_quantity then
**** File 2) MF.WEB[MF,SYS]/46P/142L
2)	begin get_next;
2)	if cur_cmd≠internal_quantity then
***************


**** File 1) MF.WEB[MF,DEK]/46P/162L
1)	begin get_symbol; l←cur_sym; get_x_next;
1)	if (cur_cmd≠equals)∧(cur_cmd≠assignment) then
**** File 2) MF.WEB[MF,SYS]/46P/162L
2)	begin get_symbol; l←cur_sym; get_next;
2)	if (cur_cmd≠equals)∧(cur_cmd≠assignment) then
***************


**** File 1) MF.WEB[MF,DEK]/46P/180L
1)	get_x_next;
1)	end;
**** File 2) MF.WEB[MF,SYS]/46P/180L
2)	get_next;
2)	end;
***************


**** File 1) MF.WEB[MF,DEK]/46P/191L
1)	get_x_next;
1)	until cur_cmd≠comma;
**** File 2) MF.WEB[MF,SYS]/46P/191L
2)	get_next;
2)	until cur_cmd≠comma;
***************


**** File 1) MF.WEB[MF,DEK]/46P/314L
1)	get_x_next;
1)	until cur_cmd≠comma;
**** File 2) MF.WEB[MF,SYS]/46P/314L
2)	get_next;
2)	until cur_cmd≠comma;
***************


**** File 1) MF.WEB[MF,DEK]/46P/334L
1)	get_x_next;
1)	end;
**** File 2) MF.WEB[MF,SYS]/46P/334L
2)	get_next;
2)	end;
***************


**** File 1) MF.WEB[MF,DEK]/46P/380L
1)	done:get_x_next;
1)	until cur_cmd≠comma;
**** File 2) MF.WEB[MF,SYS]/46P/380L
2)	done:get_next;
2)	until cur_cmd≠comma;
***************


**** File 1) MF.WEB[MF,DEK]/46P/399L
1)	get_x_next;
1)	end;
**** File 2) MF.WEB[MF,SYS]/46P/399L
2)	get_next;
2)	end;
***************


**** File 1) MF.WEB[MF,DEK]/46P/756L
1)	every_job_command: begin get_symbol; start_sym←cur_sym; get_x_next;
1)		end;
**** File 2) MF.WEB[MF,SYS]/46P/756L
2)	every_job_command: begin get_symbol; start_sym←cur_sym; get_next;
2)		end;
***************